﻿using StructureMap.Configuration.DSL;
using StructureMap;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Base
{
    public class Registrar
    {
        public static void Register()
        {
            //ObjectFactory.Configure(x => x.For<IGameProxy>().Use(
            //                                 y =>

            //                                 (GameProxy)y.GetInstance<Game>()

            //                                 ));
        }
    }

    public class BaseRegistry : Registry
    {
        public BaseRegistry()
        {
            For<Game>().Singleton().Use<GameProxy>();
            For<IGameProxy>().Use(x => (GameProxy)x.GetInstance<Game>());
            //For<GameProxy>().Use<Game>();
            For<IGraphicsDeviceManager>().Use<GraphicsDeviceManager>();            
        }
    }
}